﻿using CQIE.TES.IDAL;
using CQIE.TES.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CQIE.TES.DAL
{
    public class RoleDAL: DALBase<Role>,IRoleDAL
    {
        public object GetRole()
        {
            using (MyDB db = new MyDB()) 
            {
                var query = (from ro in db.Role
                            select ro).ToList();
                return query.Select(ro => new Role()
                {
                    ID = ro.ID,
                    Name = ro.Name
                });
            }
        }
    }
}
